package de.homelabs.modules.content.domain;

import java.util.ArrayList;
import java.util.List;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementRef;

@XmlAccessorType(XmlAccessType.FIELD)
public class HLPageElement {

	@XmlElement(required = false)
	private int id;
	@XmlElement(required = true)
	private String name;
	@XmlElement(required = true)
	private String pageUrl;
	@XmlElement(required = false)
	private boolean active;
	
	@XmlElementRef
	private List<HLPageContent> contents = new ArrayList<HLPageContent>();

	/*******************
	 * setter / getter *
	 *******************/
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPageUrl() {
		return pageUrl;
	}

	public void setPageUrl(String pageUrl) {
		this.pageUrl = pageUrl;
	}

	public boolean isActive() {
		return active;
	}

	public void setActive(boolean active) {
		this.active = active;
	}

	public List<HLPageContent> getContents() {
		return contents;
	}

	public void setContents(List<HLPageContent> contents) {
		this.contents = contents;
	}
	
}
